package cn.fengso.utils;

import java.util.ArrayList;
import java.util.List;


import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;

public class HttpUtil {
    public static String post(){
//    	DefaultHttpClient httpclient = new DefaultHttpClient();
//        HttpPost httpost = new HttpPost("https://portal.sun.com/amserver/UI/Login?" +
//                "org=self_registered_users&" +
//                "goto=/portal/dt&" +
//                "gotoOnFail=/portal/dt?error=true");
//
//        List <NameValuePair> nvps = new ArrayList <NameValuePair>();
//        nvps.add(new BasicNameValuePair("IDToken1", "username"));
//        nvps.add(new BasicNameValuePair("IDToken2", "password"));
//
//        //httpost.setEntity(new UrlEncodedFormEntity(nvps, Consts.UTF_8));
//
//        HttpResponse response = httpclient.execute(httpost);
//        HttpEntity entity = response.getEntity();
//
//        System.out.println("Login form get: " + response.getStatusLine());
        return null;
    }
}
